package com.minshenglife.zanzan.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import com.minshenglife.zanzan.dao.V_empDao;
import com.minshenglife.zanzan.entity.eoa.V_EMP;
import com.minshenglife.zanzan.service.VEmpService;

/**
 * 内勤用户service
 * @author jianghaibo
 *
 */
@Component
@Transactional
public class VEmpServiceImpl implements VEmpService {

	@Resource
	V_empDao v_empDao;

	@Override
	public V_EMP findByCodeAndIdno(String empNo, String idNo) {
		V_EMP emp = new V_EMP();
		emp.setEmpId(empNo);
		emp.setIdNo(idNo);
		List<V_EMP> emps = v_empDao.findByExample(emp);
		if(emps != null && emps.size() > 0){
			return emps.get(0);
		}
		return null;
	}
	
}
